package javabase.biji;

import javabase.pojo.Student;
import org.junit.Test;

import java.util.ArrayList;

/**
 * @Auther: luzhanshi
 * @Date: 2021/2/2 - 02 - 02 - 16:04 
 * @Description: javabase.biji
 * @version: 1.0
 */
public class _31测试hashcode {


    Student student1 = new Student("罗峰", 18, 88.0f, new ArrayList<String>(){
        {
            add("无心相通");
        }
    });
    Student student2 = new Student("罗峰", 18, 88.0f, new ArrayList<String>(){
        {
            add("无心相通");
        }
    });
    @Test
    public void test(){
        int code1 = student1.hashCode();
        int code2 = student2.hashCode();
        System.out.println(code1);
        System.out.println(code2);
        System.out.println(code1==code2);

        System.out.println(student1.equals(student2));
    }
}
